package com.itheima.travel.service.impl;

import com.itheima.travel.dao.UserMapper;
import com.itheima.travel.pojo.User;
import com.itheima.travel.service.UserService;
import com.itheima.travel.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

public class UserServiceImpl implements UserService {
    @Override
    public User userLogin(User user) {
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        User u=mapper.login(user);
        return u;
    }
}
